#include <riscv/func.h>

namespace riscv {
  Func::Func() {
    this->block_begin = nullptr;
    this->block_end = nullptr;
  }

  Func::~Func() {
    delete this->block_begin;
    this->block_begin = nullptr;
    for(auto p : this->block_list) {
      delete p;
      p = nullptr;
    }
    this->block_list.clear();
    delete this->block_end;
    this->block_end = nullptr;
  }
}
